<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sys__dept">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
        <el-form-item>
          <el-select v-model="dataForm.scanType" placeholder="请选择扫码票类型" clearable>
            <el-option label="景区门票" :value="1"> </el-option>
            <el-option label="船票" :value="2"> </el-option>
            <el-option label="渔家乐" :value="3"> </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-input v-model="dataForm.scanName" placeholder="扫码票名称"></el-input>
        </el-form-item>
        <el-form-item>
          <el-input v-model="dataForm.scanDevice" placeholder="扫码设备名称"></el-input>
        </el-form-item>
        <!-- <el-form-item>
          <el-input v-model="dataForm.userAge" placeholder="年龄"></el-input>
        </el-form-item> -->
        <el-form-item>
          <el-button @click="getDataList()">{{ $t("query") }}</el-button>
        </el-form-item>
        <el-form-item>
          <el-button v-if="$hasPermission('ocp:crc:export')" type="primary" @click="exportHandle()">导出</el-button>
        </el-form-item>
      </el-form>
      <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle"
        @sort-change="dataListSortChangeHandle" style="width: 100%">
        <el-table-column prop="scanName" label="扫码票名称" align="center" min-width="150"></el-table-column>
        <el-table-column prop="scanDevice" label="扫码设备名称" align="center" min-width="150">
        </el-table-column>
        <el-table-column prop="scanType" label="扫码票类型" align="center" width="150px">
          <template slot-scope="scope">
            {{
              scope.row.scanType == "1"
                ? "景区门票"
                : scope.row.scanType == "2"
                  ? "船票"
                  : "渔家乐"
            }}
          </template>
        </el-table-column>
        <el-table-column prop="scanLocation" label="扫码位置" min-width="120px" align="center"></el-table-column>
        <el-table-column prop="scanTime" label="扫码时间" min-width="120px" align="center"></el-table-column>
      </el-table>
      <el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="total"
        layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
        @current-change="pageCurrentChangeHandle">
      </el-pagination>
    </div>
  </el-card>
</template>

<script>
import mixinViewModule from "@/mixins/view-module";
export default {
  mixins: [mixinViewModule],
  data() {
    return {
      mixinViewModuleOptions: {
        getDataListURL: "/order/crc/page",
        getDataListIsPage: true,
        exportURL: "/order/crc/export",
      },
      dataForm: {
        startDate: "",
        endDate: "",
        scanDevice: "",
        scanName: "",
        scanType: "",
      },
    };
  },
  components: {},
  methods: {},
};
</script>
